#ifndef _NETWORK_H_
#define _NETWORK_H_
#include "queue.h"
// Initializes the network driver, allocating the space for the ring buffer.
void network_init();

// Starts receiving packets!
void network_start_receive();

// If opt != 0, enables interrupts when a new packet arrives.
// If opt == 0, disables interrupts.
void network_set_interrupts(int opt);

// Continually polls for data on the ring buffer. Loops forever!
void network_poll(struct queue_str* firstbuff);

// Called when a network interrupt occurs.
void network_trap();

//Called to handle packets
void handle_packet(struct queue_str* firstbuff);

void handle_cmd(struct node_packet *node);

void print_stat();

#endif
